<?php 
$link = $TenLT_KD."/";
$idLT = -1;
$page_show = 10;
$limit  = 20;

$offset = $limit * ($page - 1);

  
$listtins = $ado -> SanPham_List($idLT,'',-1,-1);			 

$total_record = mysql_num_rows($listtins);

$total_page = ceil($total_record/$limit);
$listtin= $ado -> SanPham_List($idLT,'',$offset,$limit);	
$num = mysql_num_rows($listtin);

?>  
        <div class="sp">
            <div class="sp_title">
                <span>
                    Sản phẩm</span></div>
            <div class="allpro">
                
                         <?php 						
						 if($num>0){
						while($row = mysql_fetch_assoc($listtin)){
						?>              
							<div class="viewpro">
								<div class="imgview">
									<a href="detail/<?php echo $row['MaSP_KD']."-".$row['idSP']; ?>.html" title="<?php echo $row['MaSP']?>">
										<img src="<?php echo $ado->getImageSizeHoang($row['UrlHinh'],140); ?>" alt="<?php echo $row['MaSP']?>" title="<?php echo $row['MaSP']?>" height="140" width="140">
									 </a>
								</div>
								<div class="tit_pro">
									<a href="detail/<?php echo $row['MaSP_KD']."-".$row['idSP']; ?>.html" title="<?php echo $row['MaSP']?>"><?php echo $row['MaSP']?></a>
								</div>
								<div class="nd_pro">Giá: <span style="color:red"><?php echo number_format($row['Gia']);?></span> VNĐ<br>Xuất xứ: <?php echo $row['XuatXu']?></div>
								<div class="xemtiep1">
									<a href="detail/<?php echo $row['MaSP_KD']."-".$row['idSP']; ?>.html" title="<?php echo $row['MaSP']?>">Chi tiết</a>
									<img src="static/icon_more.gif" alt="" height="7" width="7">
								</div>
							</div>
						<?php } } else{ echo "<p style='padding:20px'>Hiện chưa có sản phẩm nào !</p>"; }?>
                    
            </div>
        </div>
